<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-if v-show</title>
    <script src="/js/vue-2.7.9-dev.js"></script>
    <style>
       
    </style>
</head>
<body>
    <div id="app">
        <div v-if="aShow">a</div>
        <div v-else-if="cShow">c</div>
        <div v-else>b</div>

        <div v-show="aShow">欢迎来到 {{name}}</div>
        <div v-show="num===1">欢迎来到 {{name2}}</div>
        
    </div>

    <script>
        let vm = new Vue({
            data() { 
                console.log("==", this);
                return { 
                    aShow:true,
                    cShow:true,
                    name:"山西晋中理工学院",
                    name2:"产业学院",
                    num:1
                }
            }
        })
        vm.$mount("#app")
        console.log("--",vm);
    </script>
</body>
</html>